import os
from pathlib import Path

# 项目根目录 - 修复路径计算方式
BASE_DIR = Path(__file__).resolve().parent.parent.parent

# 数据库配置
DATABASE_URL = f"sqlite:///{BASE_DIR}/ai_test_platform.db"

# 文件上传配置
UPLOAD_DIR = os.path.join(BASE_DIR, "uploads")
os.makedirs(UPLOAD_DIR, exist_ok=True)

# AI模型配置
AI_MODEL_CONFIG = {
    "default_model": "deepseek",
    "deepseek": {
        "api_key": "DeepSeek Api-Key",  # 请确保此 API 密钥有效
        "model_name": "deepseek-chat",
        "api_url": "https://api.deepseek.com/v1/chat/completions"
    },
    "doubao": {
        "api_key": "DouBao Api-Key",
        "model_name": "deepseek-r1-250120",
        "api_url": "https://ark.cn-beijing.volces.com/api/v3/chat/completions"
    }
}
# 其他配置
MAX_UPLOAD_SIZE = 10 * 1024 * 1024  # 10MB
